<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html>
<head>
    <base href="<%=basePath%>">
    <meta charset="UTF-8">
    <title>Insert title here</title>
    <link rel="stylesheet" href="static/css/bootstrap.min.css" />
    <link rel="stylesheet" href="static/css/bootstrap-theme.min.css" />
</head>
<body>
<form:form cssClass="form-horizontal" action="goods/save" method="post" modelAttribute="goods" >
    <br>
    <div class="form-group">
        <label class="col-sm-2 col-md-2 control-label">商品名称</label>
        <div class="input-group col-md-2">
            <form:input cssClass="form-control" path="gname"/>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 col-md-2 control-label">商品详情</label>
        <div class="input-group col-md-2">
            <form:input cssClass="form-control" path="gdescription"/>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 col-md-2 control-label">商品价格</label>
        <div class="input-group col-md-2">
            <form:input cssClass="form-control" path="gprice"/>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 col-md-2 control-label">创建日期</label>
        <div class="input-group col-md-2">
            <form:input cssClass="form-control" placeholder="yyyy-MM-dd"  path="gdate"/>
        </div>
    </div>
    <div class="form-group">
        <div class="col-sm-offset-2 col-sm-10">
            <button type="submit"class="btn btn-success" >添加</button>
            <button type="reset" class="btn btn-primary" >重置</button>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-3 col-md-4 control-label">
            <!-- 取出所有验证错误 -->
            <form:errors  path="*"/>
        </label>
    </div>
</form:form>
</body>
</html>